<form class="form-horizontal" id="form-edit-user">

    <div class="form-group">
        <label class="control-label col-xs-2">
            邀请人手机号：
        </label>
        <div class="col-xs-9">
            <input type="text" value="" placeholder="无邀请人则默认上级为平台" name="invite_code" class="form-control" >
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-2">
            手机号
            <span style="color: #FF0000;">*</span>
        </label>
        <div class="col-xs-9">
            <input type="number" value="" required class="form-control" name="mobile" autocomplete="off">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-2">
            昵称
            <span style="color: #FF0000;">*</span>
        </label>
        <div class="col-xs-9">
            <input type="text" value="" class="form-control" name="nick_name" placeholder="请输入昵称" required autocomplete="off">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-2">
            会员类型
            <span style="color: #FF0000;">*</span>
        </label>
        <div class="col-xs-9">
            {foreach $brand_list as $k=>$v}
            <label class="checkbox-inline"><input type="checkbox" name="brand_id[]" value="{$k}">{$v}</label>
            {/foreach}
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-2">
            登录密码
            <span style="color: #FF0000;">*</span>
        </label>
        <div class="col-xs-9">
            <input type="text" class="form-control" name="password" placeholder="登录密码" >
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-2">
            确认密码
            <span style="color: #FF0000;">*</span>
        </label>
        <div class="col-xs-9">
            <input type="text" class="form-control" name="confirm_password" placeholder="确认密码" >
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-2">
            头像
        </label>
        <div class="col-xs-9">
            {include file="public/singleImageUploader" uploader-name="avatar" /}
        </div>
    </div>
    <div class="form-group">
        <div class="col-xs-offset-2 col-xs-3">
            <button type="submit" class="btn btn-success btn-block">确认添加</button>
        </div>
    </div>
</form>

<script src="__PUBLIC__/vendors/jquery.validation/jquery.validate.min.js"></script>
<script src="__PUBLIC__/vendors/jquery.validation/additional-methods.js"></script>
<script src="__PUBLIC__/vendors/jquery.validation/messages_zh.min.js"></script>
<script type="application/javascript">
    $(function () {
        $("#form-edit-user").validate({
            messages:
                {
                    mobile:"请填写手机号",
                    nick_name:"请填写昵称",
                },
            debug: true,
            submitHandler: function () {
                ajaxSubmit('form-edit-user', true);
            }
        });
    })
</script>
<script src="__PUBLIC__/vendors/select2/js/select2.min.js"></script>
<script type="application/javascript">
    $(function () {

    });
</script>